<?php
class push extends CI_Controller {
    public function __construct()
    {
        parent::__construct();
        $this->load->model('pushmanager');
    }
	
    public function youmi_get_coin()
    {
		parse_str($_SERVER['QUERY_STRING'], $_GET);
		$order=$_GET["order"];
		$app=$_GET["app"];
		$ad=$_GET["ad"];
		$chn=$_GET["chn"];
		$user=$_GET["user"];
		$points=$_GET["points"];
		$sig=$_GET["sig"];
		$dev_server_secret="78e291df6fcf39c9";
		$localSig = substr(md5($dev_server_secret . "||" . $order . "||" . $app . "||" . $user . "||" . $chn . "||" . $ad . "||" . $points), 12, 8);
		if($sig==$localSig){
			$data=$this->pushmanager->push_by_youmi($user,$points);
			//echo json_encode($data);
		}
    }
}